package com.znow.admin.system.security.service;

import com.znow.admin.dao.entity.sys.SysUserEntity;
import com.znow.admin.system.security.model.res.user.UserRequest;
import com.znow.admin.system.security.model.res.user.UserPageRequest;
import com.znow.common.model.PageResult;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * 用户服务实现类
 *
 * @author Nemo
 * @date 2022/09/29
 */
public interface SysUserService extends UserDetailsService {

    /**
     * 获取分页数据
     *
     * @param param 参数
     * @return {@link PageResult}<{@link SysUserEntity}>
     */
    PageResult<SysUserEntity> selectByPage(UserPageRequest param);

    /**
     * 得到用户id
     *
     * @param param 参数
     * @return {@link SysUserEntity}
     */
    SysUserEntity getUserId(UserPageRequest param);

    /**
     * 更新用户
     *
     * @param request 请求
     * @return boolean
     */
    boolean updateUser(UserRequest request);

    /**
     * 插入
     *
     * @param request 请求
     * @return boolean
     */
    boolean saveUser(UserRequest request);

    /**
     * 删除用户
     *
     * @param request 请求
     * @return boolean
     */
    boolean deleteUser(UserPageRequest request);
}
